<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>修改密码</title>
<!-- <link type="text/css" href="__CSS__/main.css?v={$src_version}" rel="stylesheet"/> -->
<link type="text/css" href="__CSS__/wild.css?v={$src_version}" rel="stylesheet"/>
<script type="text/javascript" src="__PUBLIC_JS__/zepto.min.js" ></script>
<script type="text/javascript" src="__PUBLIC_JS__/fastclick.js" ></script>
<script type="text/javascript" src="__PUBLIC__/layer_mobile/layer.js" ></script>   
<script type="text/javascript" src="__PUBLIC_JS__/ming.js?v={$src_version}" ></script>
</head> 
<body>
    <div class="reback"><img src="__IMG__/reback.svg" onclick="javascript:history.back(-1);"></div>
    <img class="index_img" src="__IMG__//index_img.png" alt="封面图">
    <p class="page-title">忘记密码</p>
    <form class="info-form" >
        <div class="input-item number">
            <span class="input-before"><img src="__IMG__/phone_number.png" alt="电话号码"></span>
            <input class="input phone-input" id="phone-numner" type="number" maxlength="11" value="" placeholder="请输您的入电话号码">
        </div>
        <div class="btn-group forget">
			<!-- <div class="btn btn-green"><a href="">提交申请</a></div> -->
			<input class="btn btn-green submit" type="button" style="width:100%;border: none;color: #fff" value="提交" />
        </div>
    </form>
    <div class="submit-tip" style="display: none">
        <p>您的申请已提交</p>
        <p>请联系您的企业管理员获取新密码</p>
        <p>稍后可在个人设置更改密码</p>
    </div>
 <script type="text/javascript">
$('body').on('click','.forget input',function(){
	var that=this;
	var mobile=$('#phone-numner').val();
	var	re = /^1\d{10}$/
		if (re.test(mobile)) {
			$.get("{:U('index/forget')}",{mobile:mobile}, function(data){
				if(data=="已传入信息"){
					$(that).addClass("btn-gray");
					$(that).removeClass("btn-green");
					$('.submit-tip').css('display','block');
				}else{
					alert(data);
					$('#phone-numner').val('');
				}
				
			});
		}else{
			alert('请填写正确的电话号码');
			$('#phone-numner').val('');
		} 
})

  </script>
 
  
</body>
</html>